mem alloc 


	alloc memory					ref count = 0		number of pointers pointing to the block


	
	assign block to a pointer			ref count = ref count + 1



	dellocate a pointer to a block				ref count = ref count - 1

		out of scope as function ends

		variable assigned to a different block



		if ref_count = 0 

			deallocate memory block




argument


	1. if a pointer points to the block, it may be needed at some time in the future (not safe to deallocate)


	2. if no pointer points to the block, it's impossible to access the block from the program, so it is safe to deallocate it		